<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/taglib.jsp"%>
<link href="<%=request.getContextPath()%>/css/style.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/common.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<script>
	$(function(){
			 //日期选择控件
		 	$("#startDate").click(function(){
				WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')}',isShowClear:true, readOnly:true });
			});
			$("#endDate").click(function(){
				WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}',isShowClear:true, readOnly:true });
			});
		});
   	function delVoucher(id){
   		if(!confirm('确定删除报单吗')) return;
   		
   		document.claimVoucherForm.action = "claimVoucher_deleteClaimVoucherById.action?claimVoucher.id="+id;
   		document.claimVoucherForm.submit();
   		
   	}
   	//git.oschina.net
   	
   	//www.coding.net
</script>
<div class="action  divaction">
	<div class="t">报销单列表</div>
	<div class="pages">
		<div class="forms">
			<s:form action="getList.action" name="queryForm" method="post">
				<label>报销单状态</label>
				<s:select value="statu" name="statu" list="statusmap" listKey="key"
					listValue="value" headerKey="" headerValue="全部" theme="simple"></s:select>
				<label for="time">开始时间</label>
				<input type="text" name="starttime" id="startDate" class="nwinput"
					value='<s:property value="starttime"/>' />
				<label for="end-time">结束时间</label>
				<input type="text" name="endtime" id="endDate" class="nwinput"
					value='<s:property value="endtime"/>' />
				<input type="hidden" name="pageNo" value="1"/>
				<s:submit cssClass="submit_01" value="查询" />
				
			</s:form>
		</div>
		<s:form action="getList.action" name="claimVoucherForm" method="post">
			<table width="90%" border="0" cellspacing="0" cellpadding="0"
				class="list items">
				<tr class="even">
					<td>编号</td>
					<td>填报日期</td>
					<td>填报人</td>
					<td>总金额</td>
					<td>状态</td>
					<td>待处理人</td>
					<td>操作</td>
				</tr>
				<s:iterator value="pageH.voucherLs">
					<tr>
						<td><a
							href="detail.action?voucher.id=<s:property value="id"/>"><s:property
									value="id" />
						</a>
						</td>
						<td><s:date name="createTime" />
						</td>
						<td><s:property value="sysEmployeeByCreateSn.name" />
						</td>
						<td><s:property value="totalAccount" />
						</td>
						<td><s:property value="status" />
						</td>
						<td><s:property value="sysEmployeeByNextDealSn.name" />
						</td>
						<td><s:if test="#session.employee_position=='员工'">
								<s:if test="status == '新创建' || status == '已打回'">
									<a
										href="getUpdateInfo.action?voucher.id=<s:property value="id"/>">
										<img src="${images}/edit.gif" width="16" height="16" /> </a>
									<a onClick="delVoucher(<s:property value="id"/>)" href="#">
										<img src="${images}/delete.gif" width="16" height="16" /> </a>
								</s:if>
								<img src="${images}/save.gif" width="16" height="16" />
							</s:if> <a href="detail.action?voucher.id=<s:property value="id"/>">
								<img src="${images}/search.gif" width="16" height="15" /> </a> <s:if
								test="sysEmployeeByNextDealSn.name == #session.employee.name">
								<s:if
									test="status == '已提交' || status == '待审批' || status == '已审批'">
									<a href="getCheckInfo.action?voucher.id=<s:property value="id"/>">
										<img src="${images}/sub.gif" width="16" height="16" /> </a>
								</s:if>
							</s:if>
							
							</td>
					</tr>
				</s:iterator>
				<tr>
					<td colspan="6" align="center"><c:import url="rollPage.jsp"
							charEncoding="UTF-8">
							<c:param name="formName" value="document.forms[0]" />
							<c:param name="totalRecordCount" value="${pageH.totalcount}" />
							<c:param name="totalPageCount" value="${pageH.pagetotal}" />
							<c:param name="currentPageNo" value="${pageH.pageno}" />
						</c:import></td>
				</tr>
			</table>
		</s:form>
	</div>
</div>